<script>
/**
 * 设备利用率组件
 * 折线图
 */
import LineCharts from "@/pages/report/componet/chartCom/line-charts.vue";

export default {
  name: "dev-lyl",
  components: {
    LineCharts: LineCharts
  },

  props: {
    year: {
      type: String,
      default: () => {
        return new Date().getFullYear().toString()
      },
    }
  },

  data() {
    return {
      title: this.year + '设备利用率',
      showTooltip: true,
      legend: ['物资部','生产保障部','分段制造部','船坞总装1部'],
      xAxis: ['一月','二月','三月','四月','五月','六月','七月'],
      series: [
        {
          name: '物资部',
          type: 'line',
          data: [120, 132, 101, 134, 90, 230, 210]
        },
        {
          name: '生产保障部',
          type: 'line',
          data: [220, 182, 191, 234, 290, 330, 310]
        },
        {
          name: '分段制造部',
          type: 'line',
          data: [150, 232, 201, 154, 190, 330, 410]
        },
        {
          name: '船坞总装1部',
          type: 'line',
          data: [320, 332, 301, 334, 390, 330, 320]
        }
      ]
    }
  },


  methods: {
    searchData() {
      this.$refs.lineCharts.refreshOptions();
    },

  }

}
</script>

<template>
  <view class="line-box">
    <line-charts
        ref='lineCharts'
        :showTooltip="showTooltip"
        :xAxis='xAxis'
        :series='series'
        :title="title"
    />
  </view>

</template>

<style scoped lang="scss">


</style>